home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / DOExtractDMS / dopus-dmsextract / ExtractDMS.dopus < prev    next >
Text File  |  1996-08-06  |  3KB  |  108 lines

  1. /*rx
  2.  *
  3.  * ExtractDMS.rexx - Entpackt alle selektierten DMS-Dateien im aktuellen
  4.  *                   Fenster auf HF-Disks. Die nötigen HF-Medien werden
  5.  *                   bei Bedarf selbstständig gemountet.
  6.  *
  7.  * $VER: ExtractDMS 40.005 (06 Aug 1996) by Torsten Enkelmann
  8.  *
  9.  * Usage: ARexx command ExtractDMS {F} (from DOpus)
  10.  *
  11.  * $HISTORY:
  12.  *
  13.  * 06 Aug 1996 : 040.005 :  Extrahieren der DMS-Files
  14.  * 06 Aug 1996 : 040.004 :  Anlegen der Mountlists und mounten der HF-Disks
  15.  * 06 Aug 1996 : 040.003 :  Automatische Erkennung von DMS-Files eingebaut
  16.  * 06 Aug 1996 : 040.002 :  Zweiter Versuch
  17.  * 06 Aug 1996 : 040.001 :  Erster Versuch
  18.  *
  19.  */
  20.  
  21. /*---------------NO USER SERVICABLE PARTS BELOW :-)----------------------------*/
  22.  
  23. /* misc. variables */
  24.  
  25. einheit = 0
  26. DOpusPort   = 'DOPUS.1'
  27.  
  28. if ~show(l,'rexxsupport.library') then
  29.     call addlib('rexxsupport.library',0,-30)
  30.  
  31. /* Sichergehen, das DOpus läuft... */
  32.  
  33. if showlist('Ports', DOpusPort) = 0 then do
  34.    say 'Directory Opus Arexx port nicht Gefunden. Abbruch.'
  35. end
  36. else do
  37.  
  38.    /* Dopus ARexx Port ansprechen... */
  39.  
  40.    address 'DOPUS.1'
  41.    options results
  42.  
  43.    /* Übergebene Dateien parsen */
  44.  
  45.    parse arg Dateien
  46.  
  47.    /* Jetzt gehts los... */
  48.  
  49.    do while Dateien ~= ''
  50.  
  51.       /* Jede Datei einzeln herausholen */
  52.  
  53.       parse var Dateien file Dateien
  54.  
  55.       /* Die lästigen Anführungsstriche entfernen */
  56.  
  57.       dummy=right(file,length(file)-1)
  58.       file=left(dummy,length(dummy)-1)
  59.  
  60.       /* Und der Einfachheit halber alles in Großbuchstaben wandeln */
  61.  
  62.       dummy=upper(file)
  63.       file=dummy
  64.  
  65.       /* Kontrollieren, ob wir wirklich ein DMS-File haben */
  66.  
  67.       if right(file,4) ~= '.DMS' then do
  68.  
  69.          /* Wenn nicht, die nächste Datei kontrollieren */
  70.  
  71.          iterate
  72.       end
  73.  
  74.       /* Informationen in der DOpus Titelzeile ausgeben */
  75.  
  76.       TopText "Extracting " || file || " ! Please wait..."
  77.       einheit = einheit +1
  78.  
  79.       /* Kontrollieren, ob das benötigte HF-Medium schon gemountet ist */
  80.  
  81.       if ~exists("HF" || einheit) then do
  82.          do while exists("T:mount." || einheit)
  83.             einheit = einheit + 1
  84.          end
  85.          call open(mountlist, "T:mount." || einheit,write)
  86.          call writeln(mountlist,"HF" || einheit || ":   Device = fmsdisk.device")
  87.          call writeln(mountlist,"       Unit   = " || einheit || "")
  88.          call writeln(mountlist,"       Flags  = 1")
  89.          call writeln(mountlist,"       Surfaces = 2")
  90.          call writeln(mountlist,"       BlocksPerTrack = 11")
  91.          call writeln(mountlist,"       Reserved = 2")
  92.          call writeln(mountlist,"       Interleave = 0")
  93.          call writeln(mountlist,"       LowCyl = 0")
  94.          call writeln(mountlist,"       HighCyl = 79")
  95.          call writeln(mountlist,"       Buffers = 2")
  96.          call writeln(mountlist,"       BufMemType = 0")
  97.          call writeln(mountlist,"#")
  98.          call writeln(mountlist,"")
  99.          call close(mountlist)
  100.          address command "C:Mount hf" || einheit || ": from T:mount." || einheit || ""
  101.          address command "runback C:dms write " || file || " to hf" || einheit || ": NOTEXT NOPAUSE"
  102.       end
  103.    end
  104. end
  105. TopText "Fertig!"
  106. EXIT
  107.  
  108.